package com.itheima.homework;

public class Manager extends Employee {
    // 属性
    private Clerk clerk; // 职员对象 0x002 {李晓亮 , C001 , 销售部}

    public Manager() {
    }

    public Manager(String name, String workId, String dept, Clerk clerk) {
        super(name, workId, dept);
        this.clerk = clerk;
    }

    public Clerk getClerk() {
        return clerk;
    }

    public void setClerk(Clerk clerk) {// clerk = 0x002
        this.clerk = clerk;
    }

    @Override
    public void showMsg() {
        System.out.println(getDept() + "的: " + getName() + ",员工编号: " + getWorkId() + "\n" +
                "他的职员是" + clerk.getName());
    }
}
